import request from "@/utils/request.js";

export function login(username,password){
    return request({
        url:'/auth/login',
        method:'POST',
        data: {
            username,
            password
        }
    })
}
export const register = (userData) => {
  return request({
    url: '/auth/register',  // 根据您的API路径进行调整
    method: 'post',
    data: userData
  })
}

export const logout = () => {
    return request({
        url: '/auth/logout',
        method: 'post'
    })
}

export const refreshToken = () => {
    return request({
        url: '/auth/refresh',
        method: 'post'
    })
}